<template>
    <div class="about_wraper">
        <!-- 导航条 -->
        <Nav />

        <div class="banner_wrap">
            <div class="header_wrap">
                <div class="header_title" v-if="detail">{{ detail.title }}</div>
                <div class="description" v-if="detail">
                    {{ detail.description }}
                </div>
            </div>
        </div>

        <div class="detail_wrap">

            <div class="news_items_wrap">
                <div class="container" v-if="detail">
                    <div v-if="detail" v-html="detail.context"></div>
                </div>

            </div>

        </div>

        <!-- 底部footer -->
        <Footer />

    </div>
</template>
<script>
import Nav from '@/views/nav/index'
import Footer from '@/views/footer/index'
import p1 from '@/assets/images/wi/21.png'
import { getStore } from '@/libs'
export default {
    name: "index",
    components: {
        Nav,
        Footer,
    },
    data() {
        return {
            p1,
            params: null,
            detail: null
        }
    },



    created() {
        this.params = this.$route.query
        this.getInfo()
    },
    methods: {
        /**
         * 详细信息
         */
         async getInfo() {
            let terminal = 2
            let country = 1

            // 切换语言
            if(getStore({name: 'language'}) === 'jp') {
                country = 2
            }
            const res = await this.$http({
                url: '/api/sitecase/info',
                method: 'GET',
                params: {id: this.params.id, country}
            })
            this.detail = Object.assign({}, res.data)
        },
    }
};
</script>


<style lang="scss" scope>
.about_wraper{
    background-color: #F8F9F9;

    .banner_wrap{
        position: relative;
        width: 100%;
        height: 400px;
        background-image: url('../../assets/images/wi/detail_header.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;

        .header_wrap{
            width: 1080px;
            display: flex;
            justify-content: center;
            flex-direction: column;
            align-items: center;
            .header_title{
                font-size: 28px;
                font-weight: bold;
                color: #333;
                margin-bottom: 30px;
            }

            .description{
                padding: 10px 100px;
                font-size: 16px;
                color: #666;
            }
        }

    }
    .detail_wrap{
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        .news_items_wrap{
            width: 100%;
            margin: 0px 0 50px 0;
            display: flex;
            flex-direction: column;
            justify-content: center;

            .container{
                text-align: center;
                padding: 20px;
                overflow: hidden;
            }
        }
    }

}

</style>
